#include "Interface.h"



void pause()
{
    int continuer = 1;
    SDL_Event event;

    while (continuer)
    {
        SDL_WaitEvent(&event);
        switch(event.type)
        {
            case SDL_QUIT:
                continuer = 0;
        }
    }
}
void ouvertureFenetre() {

    SDL_Surface *fenetre = NULL, *imageDeFond = NULL;
    SDL_Rect positionImageDeFond;

    positionImageDeFond.x = 0;
    positionImageDeFond.y = 0;

    SDL_WM_SetCaption("Jeu d'echec PVS 2D", NULL);

    fenetre=SDL_SetVideoMode(595, 595, 32, SDL_HWSURFACE | SDL_DOUBLEBUF);
    assert (fenetre != NULL);

    imageDeFond = IMG_Load("echecdamier.gif");
    SDL_BlitSurface(imageDeFond, NULL, fenetre, &positionImageDeFond);
        if(!imageDeFond)
        {
            printf("IMG_Load: %s\n", IMG_GetError());
        }

    SDL_Flip(fenetre);
    pause();

    SDL_FreeSurface(imageDeFond);
}
